package com.zm.xiaohashu.note.biz.constant;

public class RedisKeyConstants {

    /**
     * 笔记详情 KEY 前缀
     */
    public static final String NOTE_DETAIL_KEY = "note:detail:";
    public static final String USER_NOTE_LIKE_ZSET_KEY = "user:note:likes:";



    /**
     * 构建完整的笔记详情 KEY
     * @param noteId
     * @return
     */
    public static String buildNoteDetailKey(Long noteId) {
        return NOTE_DETAIL_KEY + noteId;
    }

    /**
     * 咆哮位图：用户笔记点赞
     */
    public static final String USER_NOTE_LIKE_BITMAP = "bitmap:note:likes:";

    public static String buildUserNoteLikeBitmapKey(Long userId) {
        return USER_NOTE_LIKE_BITMAP + userId;
    }

    /**
     * 构建完整的用户笔记点赞列表 ZSet KEY
     * @param userId
     * @return
     */
    public static String buildUserNoteLikeZSetKey(Long userId) {
        return USER_NOTE_LIKE_ZSET_KEY + userId;
    }

}